package com.gxa.mapper.shezhimapper;

import com.gxa.pojo.KeHu;
import com.gxa.pojo.KeHuType;
import com.gxa.pojo.KeHu_Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author weishen
 */
@Mapper
public interface KeHuMapper{

    List<KeHu> selectAllKeHu();
    int selectCountKeHu();
    int selectCountAnyKeHu(
                           @Param("keHuType") String keHuType,@Param("keHuBianHao") String keHuBianHao,
                           @Param("keHuMingCheng") String keHuMingCheng,@Param("lianXiRen") String lianXiRen,
                           @Param("phone") String phone);
    List<KeHu> selectAllKeHuForPage(@Param("index") int index, @Param("size") int size);

    List<KeHuType> selecAllKeHuType();


    List<KeHu> selectKeHuByTypeOrBianHaoOrLianXiRenOrMingChenOrPhone(@Param("index")int index,@Param("size")int size,
                                                                     @Param("keHuType") String keHuType,@Param("keHuBianHao") String keHuBianHao,
                                                                     @Param("keHuMingCheng") String keHuMingCheng,@Param("lianXiRen") String lianXiRen,
                                                                     @Param("phone") String phone);
    int insertKeHu(KeHu_Insert keHu);

    int updateKeHuById(KeHu keHu);

    int deleteKeHuById(int id);

}
